import "./router/index";
import "./storage/index";
const moment = require("./utils/moment");

App({
  onLaunch() {
    wx.showShareMenu()
    //挂载加载中
    wx.Loading = (options = {}) =>
      wx.showLoading({
        ...options,
        mask: true,
      });
    //  挂载轻提示
    wx.Toast = (options = {}) =>
      wx.showToast({
        ...options,
        mask: true,
        duration: 2000,
      });

    //  挂载时间
    wx.$moment = moment;

    // 挂载Logger
    wx.Logger = (message, type = "log") => {
      if (type === "error") {
        // TODO:埋点上报
        return;
      }
      return console[type](message);
    };
    //  TODO:挂载路由跳转
  },
  globalData: {
    StatusBar: null,
    CustomBar: null,
    Custom: null,
  },
});